<div class="text-center">
	<h1 translate="ADMIN.IP_CHANGES"></h1>

	<loading-indicator hide="vm.ipchanges"></loading-indicator>

	<uib-pagination max-size="10" items-per-page="vm.itemsPerPage" total-items="vm.totalItems" ng-model="vm.currentPage" ng-click="vm.getIpChanges()" previous-text="{{ 'PAGER.PREVIOUS' | translate }}" next-text="{{ 'PAGER.NEXT' | translate }}" boundary-links="true" first-text="{{ 'PAGER.FIRST' | translate }}" last-text="{{ 'PAGER.LAST' | translate }}"></uib-pagination>

	<div class="col-lg-10 col-lg-push-1">
		<table class="table text-left" ng-show="vm.ipchanges">
			<tr>
				<th class="text-left" translate="TORRENTS.DATE"></th>
				<th class="text-left" translate="TORRENTS.NAME"></th>
				<th class="text-left" style="width: 500px;" translate="ADMIN.IP_HOST"></th>
				<th class="text-center" style="width: 150px;" translate="ADMIN.SECURITY_CHECK"></th>
			</tr>
			<tr ng-repeat="ipchange in vm.ipchanges">
				<td>{{ ::ipchange.added }}</td>
				<td><user user="::ipchange.user"></user></td>
				<td><a href="" ui-sref="admin-search({ip: ipchange.ip})">{{ ::ipchange.ip }}</a> (<b>{{ ::ipchange.hostname }}</b>)</td>
				<td class="text-center">
					<button ng-show="::ipchange.level == 1" ui-sref="admin-search({ip: ipchange.ip})" class="btn btn-xs btn-warning" translate="ADMIN.IP_WARNING"></button>
					<button ng-show="::ipchange.level > 1" ui-sref="admin-search({ip: ipchange.ip})" class="btn btn-xs btn-danger" translate="ADMIN.IP_WARNING"></button>
				</td>
			</tr>
		</table>
	</div>

	<uib-pagination max-size="10" items-per-page="vm.itemsPerPage" total-items="vm.totalItems" ng-model="vm.currentPage" ng-click="vm.getIpChanges()" previous-text="{{ 'PAGER.PREVIOUS' | translate }}" next-text="{{ 'PAGER.NEXT' | translate }}" boundary-links="true" first-text="{{ 'PAGER.FIRST' | translate }}" last-text="{{ 'PAGER.LAST' | translate }}"></uib-pagination>
</div>
